import 'package:flutter/material.dart';

void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
  @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return MaterialApp(
        title: '电影海报实例',
        home: Scaffold(
          appBar: AppBar(
            title: Text('电影海报'),
          ),
          body: GridView(
            gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
              crossAxisCount: 3,
              mainAxisSpacing: 2.0,
              crossAxisSpacing: 2.0,
              childAspectRatio: 0.7
            ),
            children: <Widget>[
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),
              Image.network('https://img.mukewang.com/5c18cf540001ac8206000338-240-135.jpg',fit: BoxFit.cover,),

            ],
          ),
        ),
      );
    }
}